#!/bin/sh
ps -ef|grep -v 'grep'|grep 'tourist_predict.py'|awk '{print $2}'|xargs kill -9
tourist_predict=$(ps -ef|grep -v 'grep'|grep -c 'tourist_predict.py')

ulimit -c unlimited

echo "$tourist_predict"
if [ "$tourist_predict" -eq "0" ]
then
cd /data/python_server/alg_pro/task/

python tourist_predict.py &
cd /data/python_server/logs/
now=`date +%Y-%m-%d[%H:%M:%S]`
echo "at $now start tourist_predict.py \n">> tourist_predict.log
fi